package com.malty.gateway.sign;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

import java.util.Collections;
import java.util.Map;

/**
 * pos方法 空请求体签名验证
 *
 * @author malty
 */
public class EmptySignStrategy extends ApiSignStrategy {
    @Override
    public String doCalculateSign(String signKey, String sourceStr) {
        return StringUtils.EMPTY;
    }

    @Override
    public Mono<Void> checkSign(String signKey, ServerWebExchange exchange) {
        return Mono.empty();
    }

    @Override
    public void validateSignParam(ServerHttpRequest request) {
    }

    @Override
    public Mono<Map<String, String>> getParamMap(ServerWebExchange exchange) {
        return Mono.just(Collections.emptyMap());
    }
}
